package com.RMP
{
    import flash.display.*;
    import flash.text.*;
    import com.greensock.*;

    public class NavItem extends MovieClip
    {
        public var field:TextField;
        public var myHeight:Number;
        var fadeSpeed:Number = 0.5;
        var bg:Sprite;
        public var menuType:String;
        public var idNum:Number;
        public var btn:Sprite;
        public var myWidth:Number;
        var myRoot:MovieClip;
        var myText:String;

        public function NavItem(param1:MovieClip, param2:String, param3:String, param4:Number) : void
        {
            var _loc_5:* = undefined;
            fadeSpeed = 0.5;
            myRoot = param1;
            myText = param2;
            idNum = param4;
            menuType = param3;
            bg = new Sprite();
            bg.useHandCursor = true;
            bg.mouseEnabled = true;
            bg.buttonMode = true;
            bg.graphics.beginFill(10066329, 0);
            bg.graphics.drawRect(0, 0, 1, 1);
            bg.graphics.endFill();
            addChild(bg);
            btn = new Sprite();
            _loc_5 = new TextFormat();
            _loc_5.font = new HelveticaLightEmbed().fontName;
            _loc_5.size = 14;
            _loc_5.letterSpacing = 0;
            _loc_5.leftMargin = 0;
            _loc_5.rightMargin = 0;
            _loc_5.color = myRoot.coldColor;
            btn.useHandCursor = true;
            btn.mouseEnabled = true;
            btn.buttonMode = true;
            btn.mouseChildren = false;
            field.autoSize = "left";
            field.antiAliasType = AntiAliasType.ADVANCED;
            field.gridFitType = GridFitType.PIXEL;
            field.defaultTextFormat = _loc_5;
            field.text = myText;
            btn.addChild(field);
            addChild(btn);
            myWidth = width;
            myHeight = height;
            return;
        }

        public function fadeOutShell() : void
        {
            TweenMax.to(this, fadeSpeed, {alpha:0, overwrite:true, onComplete:function ()
            {
                visible = false;
                return;
            }
            });
            return;
        }

        public function fadeInShellDelay() : void
        {
            visible = true;
            TweenMax.to(this, fadeSpeed, {alpha:1, overwrite:true, delay:fadeSpeed});
            return;
        }

        public function fadeInShell() : void
        {
            visible = true;
            TweenMax.to(this, fadeSpeed, {alpha:1, overwrite:true});
            return;
        }

    }
}
